home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / JFC.bin / MacTreeUI.java < prev    next >
Text File  |  1998-06-30  |  18KB  |  685 lines

  1. /*
  2.  * @(#)MacTreeUI.java    1.9 98/02/02
  3.  *
  4.  * Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
  5.  *
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  *
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  *
  19.  */
  20.  
  21. package com.sun.java.swing.plaf.mac;
  22.  
  23. import java.awt.*;
  24. import java.awt.event.*;
  25.  
  26. import java.io.*;
  27. import java.util.*;
  28.  
  29. import com.sun.java.swing.*;
  30. import com.sun.java.swing.plaf.*;
  31. import com.sun.java.swing.tree.*;
  32. import com.sun.java.swing.plaf.basic.BasicTreeUI;
  33. import com.sun.java.swing.plaf.basic.VisibleTreeNode;
  34. import com.sun.java.swing.plaf.basic.LargeTreeModelNode;
  35.  
  36. /**
  37.  * <p>
  38.  * Warning: serialized objects of this class will not be compatible with
  39.  * future swing releases.  The current serialization support is appropriate
  40.  * for short term storage or RMI between Swing1.0 applications.  It will
  41.  * not be possible to load serialized Swing1.0 objects with future releases
  42.  * of Swing.  The JDK1.2 release of Swing will be the compatibility
  43.  * baseline for the serialized form of Swing objects.
  44.  *
  45.  * @version @(#)MacTreeUI.java    1.0 11/24/97
  46.  * @author Symantec
  47.  */
  48. public class MacTreeUI extends BasicTreeUI implements java.awt.event.MouseMotionListener
  49. {
  50.     protected static Icon collapsedPressedIcon    = null;
  51.     protected static Icon expandedPressedIcon        = null;
  52.     protected static Icon intermediateIcon        = null;
  53.     protected static Color GSWColor                = null;
  54.     
  55.     public void installUI(JComponent c)
  56.     {
  57.         super.installUI(c);
  58.  
  59.         isNodePressed        = false;
  60.         isIntermediate        = false;
  61.         wasStartedInControl    = false;
  62.         wasInControl        = false;
  63.         currentNode            = null;
  64.         currentENode        = null;
  65.  
  66.         //Force the renderer to be queried for each row's height.
  67.         this.setRowHeight(-1);
  68.     }
  69.     
  70.     public void uninstallUI(JComponent c)
  71.     {
  72.         super.uninstallUI(c);
  73.         mouseMotionListener = null;
  74.     }
  75.  
  76.     public static ComponentUI createUI(JComponent x)
  77.     {
  78.         return new MacTreeUI();
  79.     }
  80.     
  81.     /**
  82.      * Returns the default cell renderer that is used to do the
  83.      * stamping of each node.
  84.      */
  85.     public TreeCellRenderer createDefaultCellRenderer()
  86.     {
  87.         return new MacTreeCellRenderer();
  88.     }
  89.  
  90.     public void drawHorizontalPartOfLeg( Graphics g, JComponent c, int lineY, int leftX, int rightX  )
  91.     {
  92.         //Do nothing
  93.     }
  94.     
  95.     public void drawVerticalPartOfLeg( Graphics g, JComponent c, int depth, int parentY, int childY, int parentRowHeight, int childRowHeight )
  96.     {
  97.         //Do nothing
  98.     }
  99.  
  100.     /**
  101.      * Invoked when a mouse button has been pressed on a component.
  102.      */
  103.     public void mousePressed(MouseEvent e)
  104.     {
  105.         int row = getRow(e.getY());
  106.         wasStartedInControl = false;
  107.     
  108.         if (row > -1 && row < this.getRowCount())
  109.         {
  110.             int                    rowLevel;
  111.             int                    childIndex = -1;
  112.             LargeTreeModelNode    eNode = null;
  113.             VisibleTreeNode        node = null;
  114.     
  115.             if(!largeModel)
  116.             {
  117.                 node = this.getNode(row);
  118.                 rowLevel = node.getVisibleLevel();
  119.             }
  120.             else
  121.             {
  122.                 if(row == 0 && isRootVisible())
  123.                 {
  124.                     eNode = largeRoot;
  125.                     rowLevel = 0;
  126.                 }
  127.                 else
  128.                 {
  129.                     int[]           cIndex = new int[1];
  130.         
  131.                     eNode = getLargeParentAndChildIndexOfRow(row, cIndex);
  132.                     rowLevel = eNode.getVisibleLevel() + 1;
  133.                     childIndex = cIndex[0];
  134.                 }
  135.             }
  136.     
  137.             if(clickedInExpandControl( row, rowLevel, e.getX(), e.getY() ))
  138.             {
  139.                 if(largeModel)
  140.                     currentENode    = eNode;
  141.                 else
  142.                     currentNode        = node;
  143.                     
  144.                 wasStartedInControl = true;
  145.                 isNodePressed        = true;
  146.                 paintCurrentNode();
  147.             }
  148.         }
  149.     }
  150.  
  151.     
  152.     /**
  153.       * Returns the x origin of the given node, which is based on whether
  154.       * or not we're showing handles and the visible level of the node
  155.       * multiplied by the right and left indent factor.
  156.       */
  157.     public int getXOriginOfNode(VisibleTreeNode node)
  158.     {
  159.         int visibleLevel = node.getVisibleLevel();
  160.         
  161.         if(this.getShowsRootHandles())
  162.             visibleLevel++;
  163.  
  164.         return (totalChildIndent * visibleLevel) + xNodeAdjustment;
  165.     }
  166.  
  167.     /**
  168.      * Invoked when a mouse button has been released on a component.
  169.      */
  170.     public void mouseReleased(MouseEvent e)
  171.     {
  172.         int row = getRow(e.getY());
  173.     
  174.         if (row > -1 && row < this.getRowCount())
  175.         {
  176.             int                    rowLevel;
  177.             int                    childIndex = -1;
  178.             LargeTreeModelNode    eNode = null;
  179.             VisibleTreeNode        node = null;
  180.     
  181.             if(!largeModel)
  182.             {
  183.                 node = this.getNode(row);
  184.                 rowLevel = node.getVisibleLevel();
  185.             }
  186.             else
  187.             {
  188.                 if(row == 0 && isRootVisible())
  189.                 {
  190.                     eNode = largeRoot;
  191.                     rowLevel = 0;
  192.                 }
  193.                 else
  194.                 {
  195.                     int[]           cIndex = new int[1];
  196.         
  197.                     eNode = getLargeParentAndChildIndexOfRow(row, cIndex);
  198.                     rowLevel = eNode.getVisibleLevel() + 1;
  199.                     childIndex = cIndex[0];
  200.                 }
  201.             }
  202.     
  203.             if(clickedInExpandControl( row, rowLevel, e.getX(), e.getY() ))
  204.             {
  205.                 boolean isSameNode = false;
  206.                 
  207.                 if(largeModel && currentENode != null)
  208.                     isSameNode = currentENode.equals(eNode);
  209.                 else if(currentNode != null)
  210.                     isSameNode = currentNode.equals(node);
  211.                         
  212.                 if(isSameNode && isNodePressed)
  213.                 {
  214.                     handleExpandControlClick( node, eNode, childIndex, row );
  215.                 }
  216.                 isNodePressed    = false;
  217.             }
  218.  
  219.             int x = e.getX();
  220.     
  221.             // Perhaps they clicked the cell itself. If so, select it.
  222.             int     cellLeftX;
  223.             if(this.getShowsRootHandles())
  224.                 cellLeftX = (totalChildIndent * (rowLevel + 1)) + xNodeAdjustment;
  225.             else
  226.                 cellLeftX = (totalChildIndent * rowLevel) + xNodeAdjustment;
  227.     
  228.             if (x > cellLeftX)
  229.             {
  230.                 int cellWidth;
  231.                 
  232.                 if(!largeModel)
  233.                     cellWidth = node.getPreferredSize().width;
  234.                 else
  235.                     cellWidth = getRowBounds(row).width;
  236.                 if (x <= cellWidth + cellLeftX && !startEditing(getPathForRow(row), e))
  237.                 {
  238.                     int        originalSelectedIndex;
  239.                     
  240.                     originalSelectedIndex = lastSelectedRow;
  241.                     if(originalSelectedIndex >= this.getRowCount() || !this.isSelectedIndex(originalSelectedIndex))
  242.                         originalSelectedIndex = -1;
  243.                     
  244.                     /* Control toggles just this node. */
  245.                     if(e.isControlDown())
  246.                     {
  247.                         if(isSelectedIndex(row))
  248.                             tree.removeSelectionInterval(row, row);
  249.                         else
  250.                             tree.addSelectionInterval(row, row);
  251.                         if(originalSelectedIndex != -1)
  252.                             lastSelectedRow = originalSelectedIndex;
  253.                     }
  254.                     /* Shift adjusts from the anchor point. */
  255.                     else if(e.isShiftDown())
  256.                     {
  257.                         if(originalSelectedIndex == -1)
  258.                             tree.addSelectionInterval(row, row);
  259.                         else
  260.                         {
  261.                             if(row < originalSelectedIndex)
  262.                                 tree.setSelectionInterval(row, originalSelectedIndex);
  263.                             else
  264.                                 tree.setSelectionInterval(originalSelectedIndex, row);
  265.  
  266.                             lastSelectedRow = originalSelectedIndex;
  267.                         }
  268.                         if(originalSelectedIndex != -1)
  269.                             lastSelectedRow = originalSelectedIndex;
  270.                     }
  271.                     /* Otherwise set the selection to just this interval. */
  272.                     else
  273.                     {
  274.                         tree.setSelectionInterval(row, row);
  275.  
  276.                         //!!! LAB !!! this seems insuficient to catch a double click properly.
  277.                         if(e.getClickCount() == 2)
  278.                         {
  279.                             if(!largeModel)
  280.                             {
  281.                                 node.toggleExpanded();
  282.                                 ensureRowsAreVisible(row, row + Math.min(10, node.visibleChildCount()));
  283.                             }
  284.                             else
  285.                             {
  286.                                 if(childIndex == -1)
  287.                                 {
  288.                                     eNode.toggleExpanded();
  289.                                     ensureRowsAreVisible(row, row + Math.min(10, eNode.getTotalChildCount()));
  290.                                 }
  291.                                 else
  292.                                 {
  293.                                     if(!isExpanded(row))
  294.                                         expandRow(row);
  295.                                     else
  296.                                         collapseRow(row);
  297.                                     
  298.                                     LargeTreeModelNode     newNode;
  299.                                     
  300.                                     newNode = getLargeTreeModelNodeForRow(row, false);
  301.                                     if(newNode != null)
  302.                                         ensureRowsAreVisible(row, row + Math.min(10, newNode.getTotalChildCount()));
  303.                                     else
  304.                                         ensureRowsAreVisible(row, row);
  305.                                 }
  306.                             }
  307.                         }
  308.                     }
  309.                 }
  310.             }
  311.         }
  312.     }
  313.  
  314.     /**
  315.      * Handles Mouse Moved events
  316.      * @param e the MouseEvent
  317.      */
  318.     public void mouseMoved(MouseEvent e)
  319.     {
  320.     }
  321.  
  322.     /**
  323.      * Handles Mouse Dragged events
  324.      * @param e the MouseEvent
  325.      */
  326.     public void mouseDragged(MouseEvent e)
  327.     {
  328.         trackControl(e);
  329.     }
  330.     
  331.     public void handleExpandControlClick( VisibleTreeNode node, LargeTreeModelNode eNode,
  332.                                               int childIndex, int row )
  333.     {
  334.         animateCurrentControl();
  335.         super.handleExpandControlClick(node, eNode, childIndex, row );
  336.         paintCurrentNode();
  337.     }
  338.  
  339.     protected void installDefaults( JComponent c )
  340.     {
  341.         super.installDefaults(c);
  342.         
  343.         if(collapsedPressedIcon == null)
  344.         {
  345.             collapsedPressedIcon    = (Icon) UIManager.getIcon("Tree.collapsedPressedIcon");
  346.             expandedPressedIcon        = (Icon) UIManager.getIcon("Tree.expandedPressedIcon");
  347.             intermediateIcon        = (Icon) UIManager.getIcon("Tree.intermediateIcon");
  348.         }
  349.         if(GSWColor == null)
  350.         {
  351.             GSWColor = UIManager.getColor("GrayscaleAppearanceW");
  352.         }
  353.  
  354.         ((JTree)c).setShowsRootHandles(((Boolean) UIManager.get("Tree.showsRootHandles")).booleanValue());
  355.         
  356.         setRightChildIndent(16);
  357.         setLeftChildIndent(8);
  358.     }
  359.  
  360.     protected void installListeners( JComponent c )
  361.     {
  362.         super.installListeners(c);
  363.         
  364.         if ( (mouseMotionListener = createMouseMotionListener( c )) != null )
  365.         {
  366.             c.addMouseMotionListener( mouseMotionListener );
  367.         }
  368.     }
  369.  
  370.     protected void uninstallListeners( JComponent c )
  371.     {
  372.         super.uninstallListeners(c);
  373.         
  374.         if ( mouseMotionListener != null )
  375.         {
  376.             c.removeMouseMotionListener( mouseMotionListener );
  377.         }
  378.     }
  379.  
  380.     protected MouseMotionListener createMouseMotionListener( JComponent c )
  381.     {
  382.         return this;
  383.     }
  384.  
  385.     protected int getNodeX( VisibleTreeNode node )
  386.     {
  387.         int levelOffset = getShowsRootHandles() ? 1 : 0;
  388.         return ((node.getVisibleLevel() + levelOffset) * totalChildIndent) + xNodeAdjustment;
  389.     }
  390.  
  391.     /**
  392.      * Handles tracking the mouse in the control while pressed.
  393.      */
  394.     protected void trackControl(MouseEvent e)
  395.     {
  396.         if(wasStartedInControl)
  397.         {
  398.             if(pointInControl(currentNode, currentENode, e.getX(), e.getY()))
  399.             {
  400.                 if(!wasInControl)
  401.                 {
  402.                     wasInControl = true;
  403.                     isNodePressed = true;
  404.                     paintCurrentNode();
  405.                 }
  406.             }
  407.             else
  408.             {
  409.                 if(wasInControl)
  410.                 {
  411.                     wasInControl = false;
  412.                     isNodePressed = false;
  413.                     paintCurrentNode();
  414.                 }
  415.             }
  416.         }
  417.     }
  418.     
  419.     /**
  420.      * Calculates the row of the tree based on the vertical component of a point.
  421.      * @return the row index.
  422.      */
  423.     protected int getRow(int y)
  424.     {
  425.         int row;
  426.     
  427.         checkConsistency();
  428.         if(tree != null && tree.isEnabled())
  429.         {
  430.             row = this.getRowContainingYLocation(y);
  431.             /* getRowContainingYLocation will return the last row,
  432.                even if outside of it, this insures it isn't beyond the
  433.                last row. */
  434.             if(row != -1)
  435.             {
  436.                 Rectangle         rect = getRowBounds(row);
  437.         
  438.                 if(y > (rect.y + rect.height))
  439.                 {
  440.                     row = -1;
  441.                 }
  442.             }
  443.         }
  444.         else
  445.             row = -1;
  446.         
  447.         return row;
  448.     }
  449.  
  450.     /**
  451.      * Determines if a given point is inside a given node.
  452.      * @return true if the point is inside the given node,
  453.      * false if not.
  454.      */
  455.     protected boolean pointInControl(VisibleTreeNode pNode, LargeTreeModelNode pENode, int x, int y)
  456.     {
  457.         int row = getRow(y);
  458.         
  459.         if (row > -1 && row < this.getRowCount())
  460.         {
  461.             int                      rowLevel;
  462.             int                      childIndex = -1;
  463.             LargeTreeModelNode       eNode = null;
  464.             VisibleTreeNode          node = null;
  465.     
  466.             if(!largeModel)
  467.             {
  468.                 node = this.getNode(row);
  469.                 rowLevel = node.getVisibleLevel();
  470.             }
  471.             else
  472.             {
  473.                 if(row == 0 && isRootVisible())
  474.                 {
  475.                     eNode = largeRoot;
  476.                     rowLevel = 0;
  477.                 }
  478.                 else
  479.                 {
  480.                     int[]           cIndex = new int[1];
  481.         
  482.                     eNode = getLargeParentAndChildIndexOfRow(row, cIndex);
  483.                     rowLevel = eNode.getVisibleLevel() + 1;
  484.                     childIndex = cIndex[0];
  485.                 }
  486.             }
  487.             
  488.             boolean isSameNode = false;
  489.             
  490.             if(largeModel && pENode != null)
  491.                 isSameNode = pENode.equals(eNode);
  492.             else if(node != null && currentNode != null)
  493.                 isSameNode = currentNode.equals(node);
  494.                 
  495.             if(clickedInExpandControl(row, rowLevel, x, y) && isSameNode)
  496.                 return true;
  497.         }
  498.         return false;
  499.     }
  500.  
  501.     protected void paintRow( Graphics g, JComponent c,
  502.                                  VisibleTreeNode parentNode, VisibleTreeNode childNode,
  503.                                  int childX, int childY,
  504.                                  int childRowHeight, int row )
  505.     {
  506.         g.setColor(GSWColor);
  507.         g.drawLine(0, childY + childRowHeight - 1, tree.getWidth() - 1, childY + childRowHeight - 1);
  508.         super.paintRow( g, c, parentNode, childNode, childX, childY, childRowHeight, row );
  509.     }
  510.  
  511.     /**
  512.      * Draws the current node with the current node's parameters.  i.e. is it pressed?
  513.      */
  514.     protected void paintCurrentNode()
  515.     {
  516.         JComponent    c    = tree;
  517.         Graphics    g    = tree.getGraphics();
  518.         Point        mid    = getMiddleOfControl(currentNode);
  519.         
  520.         if(largeModel && currentENode != null)
  521.         {
  522.             //??? LAB ??? What to do here?
  523.         }
  524.         else if(currentNode != null)
  525.         {
  526.  
  527.             // Draw icons if not a leaf and either hasn't been loaded,
  528.             // or the model child count is > 0.
  529.             if (!currentNode.isLeaf() && (!currentNode.hasBeenExpanded() || currentNode.getModelChildCount() > 0))
  530.             {
  531.                 if(isIntermediate)
  532.                 {
  533.                     if(intermediateIcon != null)
  534.                         drawCentered( c, g, intermediateIcon, mid.x, mid.y );
  535.                         
  536.                 }
  537.                 else if (currentNode.isExpanded())
  538.                 {
  539.                     if(isNodePressed)
  540.                     {
  541.                         if(expandedPressedIcon != null)
  542.                             drawCentered( c, g, expandedPressedIcon, mid.x, mid.y );
  543.                     }
  544.                     else
  545.                     {
  546.                         Icon expandedIcon = getExpandedIcon();
  547.                         if(expandedIcon != null)
  548.                             drawCentered( c, g, expandedIcon, mid.x, mid.y );
  549.                     }
  550.                 }
  551.                 else
  552.                 {
  553.                     if(isNodePressed)
  554.                     {
  555.                         if(collapsedPressedIcon != null)
  556.                             drawCentered( c, g, collapsedPressedIcon, mid.x, mid.y );
  557.                     }
  558.                     else
  559.                     {
  560.                         Icon collapsedIcon = getCollapsedIcon();
  561.                         if(collapsedIcon != null)
  562.                             drawCentered( c, g, collapsedIcon, mid.x, mid.y );
  563.                     }
  564.                 }                
  565.             }
  566.         }
  567.     }
  568.  
  569.     //Get the mid point of the current control.
  570.     protected Point getMiddleOfControl(VisibleTreeNode aNode)
  571.     {
  572.         Point    mid                = null;
  573.         int        childY            = 0;
  574.         int        childRowHeight    = 0;
  575.         
  576.         if(aNode != null)
  577.         {
  578.             childY            = aNode.getYOrigin();
  579.             childRowHeight    = isFixedRowHeight() ? getRowHeight() : aNode.getPreferredSize().height;
  580. //            mid = new Point((getRightChildIndent() - 1), childY + (childRowHeight / 2));
  581.         }
  582.         
  583.         mid = new Point(((totalChildIndent - 1) / 2) - 1 + xNodeAdjustment, childY + (childRowHeight / 2));
  584.  
  585.         return mid;
  586.     }
  587.     
  588.     protected boolean clickedInExpandControl( int row, int rowLevel, int mouseX, int mouseY )
  589.     {
  590.         int boxWidth;
  591.         int boxLeftX;
  592.         int boxRightX;
  593.         
  594.         if(getExpandedIcon() != null)
  595.             boxWidth = getExpandedIcon().getIconWidth();
  596.         else
  597.             boxWidth = 8;
  598.  
  599.         boxLeftX = (getMiddleOfControl(currentNode).x) - (boxWidth / 2);        
  600.         boxRightX = boxLeftX + boxWidth;
  601.         
  602.         if(!this.getShowsRootHandles() && rowLevel == 0)
  603.             return false;
  604.             
  605.         return (mouseX >= boxLeftX && mouseX <= boxRightX);
  606.     }
  607.  
  608.     //Animate the expansion or collapse of the control.
  609.     protected void animateCurrentControl()
  610.     {
  611.         if(intermediateIcon == null || currentNode == null)
  612.             return;
  613.             
  614.         JComponent    c            = tree;
  615.         Graphics    g            = tree.getGraphics();
  616.         Color        oldColor    = g.getColor();
  617.         int iconWidth            = intermediateIcon.getIconWidth();
  618.         int iconHeight            = intermediateIcon.getIconHeight();
  619.         Point mid                = getMiddleOfControl(currentNode);
  620.         
  621.         isIntermediate = true;
  622.  
  623.         try
  624.         {
  625.             
  626.             g.setColor(c.getBackground());
  627.             g.fillRect(mid.x - iconWidth/2, mid.y - iconHeight/2, iconWidth, iconHeight);
  628.             paintCurrentNode();
  629.     
  630.             try
  631.             {
  632.                 Thread.sleep(20);
  633.             }
  634.             catch (InterruptedException exc) {}
  635.     
  636.             g.fillRect(mid.x - iconWidth/2, mid.y - iconHeight/2, iconWidth, iconHeight);
  637.             
  638.             g.setColor(oldColor);
  639.         }
  640.         finally
  641.         {
  642.             isIntermediate = false;
  643.         }
  644.     }
  645.  
  646.     protected void paintExpandControl( Graphics g, JComponent c,
  647.                                            VisibleTreeNode parentNode,
  648.                                            VisibleTreeNode childNode,
  649.                                            int childX, int childY,
  650.                                            int childRowHeight, int row )
  651.     {
  652.         // Draw icons if not a leaf and either hasn't been loaded,
  653.         // or the model child count is > 0.
  654.         if (!childNode.isLeaf() && (!childNode.hasBeenExpanded() || childNode.getModelChildCount() > 0))
  655.         {
  656.             Point mid = getMiddleOfControl(childNode);
  657.             
  658.             int middleXOfKnob = mid.x;
  659.             int middleYOfKnob = mid.y;
  660.             
  661.             if (childNode.isExpanded())
  662.             {
  663.                 Icon expandedIcon = getExpandedIcon();
  664.                 if(expandedIcon != null)
  665.                     drawCentered( c, g, expandedIcon, middleXOfKnob, middleYOfKnob );
  666.             }
  667.             else
  668.             {
  669.                 Icon collapsedIcon = getCollapsedIcon();
  670.                 if(collapsedIcon != null)
  671.                     drawCentered( c, g, collapsedIcon, middleXOfKnob, middleYOfKnob );
  672.             }
  673.         }
  674.     }
  675.  
  676.     protected int xNodeAdjustment = 4;    //The number of pixels to add to the left edge.
  677.     protected boolean isIntermediate;
  678.     protected boolean wasStartedInControl;
  679.     protected boolean wasInControl;
  680.     protected boolean isNodePressed;
  681.     protected MouseMotionListener mouseMotionListener;
  682.     protected VisibleTreeNode        currentNode;
  683.     protected LargeTreeModelNode    currentENode;
  684. }
  685.